package optimizers.ganeat;

import java.io.Serializable;

import common.Static;

public class Node implements Cloneable, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static int SIMPLE_SEQUENCE = 1;
	public static int INHIBITING_SEQUENCE = 2;

	public String name;
	public double parameter;
	public double concentration;
	public int type;
	public String string;

	public Node(String name, double parameter, double concentration, int type,
			String string) {
		this.name = name;
		this.parameter = parameter;
		this.type = type;
		this.concentration = concentration;
		this.string = string;
	}

	@Override
	public Node clone() throws CloneNotSupportedException {
		return new Node(this.name, this.parameter, this.concentration,
				this.type, this.string);
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(name + " " + Static.df4.format(parameter) + " "
				+ Static.df4.format(concentration) + " " + string);
		return builder.toString();
	}
}
